#pragma once
#include "RBTree.h"

namespace zzb
{
	template<class K>
	class set
	{
	public:
		struct KeyOfSet
		{
			const K& operator()(const K& key)
			{
				return key;
			}
		};
		typedef typename RBTree<K, K, KeyOfSet>::const_iterator iterator;
		typedef typename RBTree<K, K, KeyOfSet>::const_iterator const_iterator;

		const_iterator begin() const
		{
			return _t.begin();
		}
		const_iterator end() const
		{
			return _t.end();
		}
		pair<iterator, bool> insert(const K& data)
		{
			return _t.insert(data);
		}
	private:
		RBTree<K, K, KeyOfSet> _t;
	};
}
